package cn.edu.gzgs.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * 用户数据传输对象（用于新增/编辑）
 *
 * @author Zyf
 */
@Data
@Schema(description = "用户新增/编辑DTO")
public class UserDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID (编辑时必填)")
    private Long id;

    @Schema(description = "工号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "工号不能为空")
    private String userNo;

    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "姓名不能为空")
    private String name;
    
    @Schema(description = "密码 (新增时建议填写，不填则使用默认密码)")
    private String password;

    @Schema(description = "所属部门ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所属部门不能为空")
    private Long deptId;

    @Schema(description = "来校日期")
    private LocalDate entryDate;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "用户状态：1-正常，0-禁用", defaultValue = "1")
    private Integer status;

    @Schema(description = "角色ID列表")
    private List<Long> roleIds;
    
    @Schema(description = "职称ID列表")
    private List<Long> titleIds;
    
    @Schema(description = "岗位ID列表")
    private List<Long> positionIds;
    
    @Schema(description = "职务ID列表")
    private List<Long> dutyIds;

    @Schema(description = "学历/学位ID列表")
    private List<Long> educationIds;
} 